Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement of memory management for #678 #699

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

victor-cr
Copy link

Avoiding recreating logger for the namespace which has been already created. Fix memory leak for a fixed number of categories. For dynamic categories method destroy is still required. #678

…reated. Fix memory leak for a fixed number of categories. For dynamic categories method destroy is still required. debug-js#678
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 88.123% when pulling b0026ed on victor-cr:master into 5c7c61d on visionmedia:master.

@coveralls
Copy link

coveralls commented Apr 22, 2019

Coverage Status

Coverage increased (+0.5%) to 88.168% when pulling 54d4acc on victor-cr:master into 5c7c61d on visionmedia:master.

@randycoulman
Copy link

Thanks for this PR! I was thinking of submitting a similar one myself, as we just discovered that this memory leak was hitting us hard.

I was thinking about using a Map instead of an object for the instances. Would that be a better choice?

Map seems like the more suitable data structure for this usage and would simplify the code in destroy and enable, but I'm not sure of the relative performance characteristics, or whether Map is available in every target environment.

@victor-cr
Copy link
Author

I have no objection of using Map - the reason I was using object just to use as simple entity as it is possible. Also, destroy and enable are rarely used in comparison to logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants